package com.lvmama.rhino.web.sso;

import com.lvmama.entity.system.SysUser;

/**
 * 获取系统session
 */
public class SystemSession {
    private static ThreadLocal<SysUser> local = new ThreadLocal<>();

    /**
     * 设置用户信息
     *
     * @param user 登录用户
     */
    public static void setUser(SysUser user) {
        local.set(user);
    }
    /**
     * 获取登录用户信息
     *
     * @return 登录用户
     */
    public static SysUser getUser() {
        return local.get();
    }
}
